﻿<?php //Seyret Component v.0.3//
/**
* @package Seyret
* @version 0.3
* @copyright Copyright (C) 2008 Mustafa DINDAR. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Seyret Video Component is a free software.
* See seyrettos.html for license notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );




$mainchartfilelink=JURI::root().'/'.JH_SEYRETFILESDIR.'/cache/pro/stats/daily/'.md5("maindailyalone".$this->videoid).".xml";

$mainchartfile=JPATH_SITE.DS.JH_SEYRETFILESDIR.DS.'cache'.DS.'pro'.DS.'stats'.DS."daily".DS.md5("maindailyalone".$this->videoid).".xml";


if(file_exists($mainchartfile)) {
		
$random = rand(5, 100);
?>


<div style="text-align:center !important; padding:10px;">
	<object width="800" height="500">
	<param name="FlashVars" value="scale=noscale&key=<?php echo  $this->seyretswfprokey;?>&xml_source=<?php echo JURI :: root();?>components/com_seyret/includes/tools/swf/sample.xml">
	<param name="movie" value="<?php echo JURI :: root()."components/com_seyret/includes/tools/swf/statistics.swf"?>">
	<embed src="<?php echo JURI :: root()."components/com_seyret/includes/tools/swf/statistics.swf"?>" width="800" height="500"   allowfullscreen="true" FlashVars="scale=noscale&key=<?php echo  $this->seyretswfprokey;?>&xml_source=<?php echo $mainchartfilelink; ?>?<?php echo $random;?>">
	</embed>
	</object>
</div>


<?php
} else {
	echo JText::_('Statistics not available yet');

}

?>